trait TransmogrifiableCore {	
	trait Transmogrifiable[s <: Transmogrifiable[s]] requires s{
		def transmogrify :s // forces inheritors to adhere to a type which may be too precise
	}
} 

trait FooCore {	
	type TFoo <: Foo$FooCore

	type TBar <: TFoo with Bar$FooCore	
	type TBaz <: TFoo with Baz$FooCore

	def Bar() :TBar 
	def Baz() :TBaz 
	
	trait Foo$FooCore requires TFoo
	 trait Bar$FooCore requires TBar extends Foo$FooCore
	 trait Baz$FooCore requires TBaz extends Foo$FooCore
}

trait XMogFoo[SelfT <:  TransmogrifiableCore with FooCore with XMogFoo[SelfT]  ] requires SelfT {
	type TFoo2 <: Foo$XMogFoo with Foo$FooCore with Transmogrifiable[TFoo]
	
	type TBar <: TFoo with Bar$FooCore with Bar$XMogFoo
	type TBaz <: TFoo with Baz$FooCore with Baz$XMogFoo 

	
	trait Foo$XMogFoo requires TFoo2 extends Foo$FooCore with Transmogrifiable[TFoo]
	
	trait Bar$XMogFoo requires TBar extends Foo$XMogFoo with Bar$FooCore {
		def transmogrify = Baz
	}
	
	trait Baz$XMogFoo requires TBaz extends Foo$XMogFoo with Baz$FooCore {
		def transmogrify = Bar
	}	
}

class Deployment extends TransmogrifiableCore with FooCore with XMogFoo[Deployment] {
	type TFoo = Foo$FooCore with Foo$XMogFoo
	type TBar = Bar$FooCore with Bar$XMogFoo	
	type TBaz = Baz$FooCore with Baz$XMogFoo
	
	def Bar() = new Bar$FooCore with Bar$XMogFoo
	def Baz() = new Baz$FooCore with Baz$XMogFoo
}